Terrebonne Frag Markdown 2

Marsh Vegetation Dataset

Task 1. Total # marsh transects at each site and subsite

## # A tibble: 3 x 3
##   crms_site quadrat_num transect_num
##   <fct>           <int>        <int>
## 1 345               186           63
## 2 311               187           63
## 3 369               189           63
## # A tibble: 9 x 4
## # Groups:   crms_site [?]
##   crms_site frag  quadrat_num transect_num
##   <fct>     <fct>       <int>        <int>
## 1 345       L              63           21
## 2 345       M              61           21
## 3 345       H              62           21
## 4 311       L              63           21
## 5 311       M              63           21
## 6 311       H              61           21
## 7 369       L              63           21
## 8 369       M              63           21
## 9 369       H              63           21

Task 2. total # transects that have Sa at each site and subsite;
total # transects that have Sp at each site and subsite

## # A tibble: 9 x 5
## # Groups:   crms_site [?]
##   crms_site frag  Spartina_alt quadrat_num transect_num
##   <fct>     <fct> <chr>              <int>        <int>
## 1 345       L     Yes                   63           21
## 2 345       M     Yes                   61           21
## 3 345       H     Yes                   62           21
## 4 311       L     Yes                   60           21
## 5 311       M     Yes                   60           21
## 6 311       H     Yes                   61           21
## 7 369       L     Yes                   50           19
## 8 369       M     Yes                   50           19
## 9 369       H     Yes                   59           21
## # A tibble: 6 x 5
## # Groups:   crms_site [?]
##   crms_site frag  Spartina_pat quadrat_num transect_num
##   <fct>     <fct> <chr>              <int>        <int>
## 1 311       L     Yes                    8            5
## 2 311       M     Yes                    5            4
## 3 311       H     Yes                    2            1
## 4 369       L     Yes                    9            7
## 5 369       M     Yes                   19           14
## 6 369       H     Yes                   25           16

Task 3. Average, max, min, and range of elevation per subsite, and overall average max, min, range of elevation per site.
Average, max, min, and range of elevation at each point along the transect (0, 2.5m, 5m) by site, and by subsite.

## # A tibble: 9 x 5
## # Groups:   crms_site [?]
##   crms_site frag  elev_min elev_max elev_mean
##   <fct>     <fct>    <dbl>    <dbl>     <dbl>
## 1 345       L     -0.128      0.178    0.0410
## 2 345       M     -0.192      0.168    0.0413
## 3 345       H     -0.160      0.137   -0.0301
## 4 311       L     -0.00395    0.440    0.190 
## 5 311       M      0.0912     0.377    0.250 
## 6 311       H     -0.277      0.312    0.0906
## 7 369       L     -0.235      0.382    0.142 
## 8 369       M     -0.263      0.230    0.0263
## 9 369       H     -0.135      0.264    0.0669
## # A tibble: 27 x 6
## # Groups:   crms_site, frag [?]
##    crms_site frag  dist_from_edge_m elev_min elev_max elev_mean
##    <fct>     <fct>            <dbl>    <dbl>    <dbl>     <dbl>
##  1 345       L                    0 -0.128     0.134     0.0279
##  2 345       L                    2 -0.0216    0.178     0.0543
##  3 345       L                    5 -0.0198    0.166     0.0409
##  4 345       M                    0 -0.192     0.127     0.0260
##  5 345       M                    2 -0.0208    0.168     0.0564
##  6 345       M                    5 -0.0775    0.151     0.0433
##  7 345       H                    0 -0.160     0.101    -0.0344
##  8 345       H                    2 -0.144     0.137    -0.0294
##  9 345       H                    5 -0.159     0.0974   -0.0263
## 10 311       L                    0  0.00206   0.316     0.191 
## # ... with 17 more rows

Task 4. Check if Shannon Weiner should be bounded between 0-1; recheck your calculation for that and Simpsons.

Vegan package’s diversity() function calculates each as:

Shannon-Wiener
\[ H = -\sum\limits_{i=1}^Sp_i*log_b*p_i\] * Not bound 0-1
* Shannon’s index accounts for both abundance and evenness of the species present

Evenness
\[ J = H/log(S)\] * Evenness is a compliment to the Shannon index

Simpson’s indices
\[ D_1 = 1-\sum\limits_{i=1}^Sp_i^2\] * bound 0-1
* Often displayed this way as “$D1 = 1 - D”, and referred to this way as Simpson’s index of diversity, NOT simpson’s index (D)
* Calculated this way with “1-equation”, to be more intuitive with larger Values = greater diversity
* The index represents the probability that two individuals randomly selected from a sample will belong to different species

Inverse Simpson
\[ D_2 = \frac{1}{1-\sum\limits_{i=1}^Sp_i^2}~~~~~~~=~~~~~~~~D_2 = \frac{1}{D_1}\] * The higher the value, the greater the diversity. The maximum value is the number of species (or other category being used) in the sample. For example if there are five species in the sample, then the maximum value is 5.

Task
Calculate diversity, evenness, richness on the quadrat scale and on the transect scale. So, for each transect, there should be a measure of diversity for 0m, 2.5m, and 5m, and a separate measure that includes all 3 quadrats for that transect.

CRMS data 1/1/2015 - 12/31/2016

Task Get average, max, min, range of salinity for each site from CRMS for 1 year prior to April sampling.

## # A tibble: 3 x 7
##   crms_site min_sal mean_sal max_sal temp_min mean_temp max_temp
##       <int>   <dbl>    <dbl>   <dbl>    <dbl>     <dbl>    <dbl>
## 1       311    0.09    13.5     24.0    -0.43      23.8     35.9
## 2       345    0.11    16.3     28.0     2.73      23.4     35.8
## 3       369    0.1      6.30    18.2     1.9       23.5     36.1

Open Water Survey

Task Get average, max, min, range of salinity for each sub-site from open water sampling in April:

Problem: Lots of missing values ( > 50%) at the station level. Might not be able to look at salinity at a finer scale than subsite.

## # A tibble: 9 x 8
## # Groups:   crms_site [3]
##   crms_site subsite_id ss_sal_min ss_sal_max ss_sal_mean ss_elev_min
##   <fct>     <chr>           <dbl>      <dbl>       <dbl>       <dbl>
## 1 369       369-H            5.3         8.6        6.82      -1.11 
## 2 369       369-L            8.2        14.1       11.6       -1.00 
## 3 369       369-M            4.2         5.6        4.78      -1.17 
## 4 311       311-H            7.61       10.8        8.57      -0.797
## 5 311       311-L           13.3        13.5       13.4       -1.07 
## 6 311       311-M           13.4        13.5       13.5       -1.04 
## 7 345       345-H           13.9        14.5       14.3       -0.943
## 8 345       345-I            7.72        8.6        8.24      -0.710
## 9 345       345-L            7.75       10.0        9.12      -0.825
## # ... with 2 more variables: ss_elev_max <dbl>, ss_elev_mean <dbl>

Surface irradiance at the bottom

Find the equation for percent surface irradiance at the bottom and see if you can calculate it with the data we have for the open water (you should be able to). You should need surface irradiance (topmost par sensor), bottom irradiance (bottommost par sensor) and water depth.

For each sampling event at each station, we have two light meter measurements, at the surface and at the bottom. a light attenuation coefficient (Kd) can be calculated for either as:

\[K_d = [ln(I_0/I_z)]/z\]

where \(I0\) is incident irradiance at the surface and \(Iz\) is light intensity at depth (z) in meters (Kirk, 1994), or in our case with paired sensors z = distance between sensors in m. Light attenuation coefficients were not corrected for cloud cover or sun angle.

Calculating the percentage of incident light reaching the bottom (%SI) is done in (Choice, Frazer, & Jacoby, 2014) as: \[ \%SI = (I_z/I_0) * 100 = exp(K_d*z) * 100\] This gives two ways to calculate %SI, and I am not sure if they are calculating the %SI for the whole water column or % light lost between the two bulbs, which should then be multiplied by total depth.

If we compare the two %SI equations, one using just the bulb PAR values and the other using Kd, you can see that the equations yield different results that I’m unsure the height of the light meter off the bottom could explain away.

Ordination Plots and Analysis of Similarity (ANOSIM)

Using ggplot for ordination plot instead

ANOSIM, MRPP, Multivariate Analysis of Variance Using Distance Matrices

ANOSIM is good, but is a rank-order test that will tend to group things together despite outliers.
MRPP is permutational, and is more sensitive to outliers so it can tend to make to find too many groups.
Multivariate Analysis of Variance using Distance Matrices canbe used in most situations that the others can, and is better in most ways.

Anosim at site and subsite levels

## 
## Call:
## anosim(x = pcov.mat, grouping = diversity.meta.2$crms_site, permutations = 1000) 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.1218 
##       Significance: 0.000999 
## 
## Permutation: free
## Number of permutations: 1000
## 
## Upper quantiles of permutations (null model):
##     90%     95%   97.5%     99% 
## 0.00184 0.00264 0.00374 0.00447 
## 
## Dissimilarity ranks between and within classes:
##             0%      25%      50%      75%     100%      N
## Between 2926.5  75013.5 148849.0 217804.5 268521.0 186996
## 345     2926.5  34359.5  75013.5 126802.0 241471.5  30876
## 311     2926.5  55709.5 111300.5 173894.5 268521.0  30628
## 369     2926.5 138061.5 192754.0 234052.0 268521.0  31626

##   Between       345       311       369 
## 145733.88  84796.31 118301.82 181567.61
##  Between 
## 55.59353

## 
## Call:
## anosim(x = pcov.mat, grouping = diversity.meta.2$subsite_id,      permutations = 1000) 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.1162 
##       Significance: 0.000999 
## 
## Permutation: free
## Number of permutations: 1000
## 
## Upper quantiles of permutations (null model):
##     90%     95%   97.5%     99% 
## 0.00265 0.00374 0.00478 0.00611 
## 
## Dissimilarity ranks between and within classes:
##             0%      25%      50%      75%     100%      N
## Between 2926.5  71558.5 142655.5 212611.5 268521.0 249330
## 345-L   2926.5  34359.5  87111.0 139477.5 241471.5   3486
## 311-L   2926.5  75013.5 142564.5 212671.5 268521.0   3486
## 369-L   2926.5 144373.5 202536.5 242930.9 268521.0   3486
## 345-M   2926.5  27924.0  75013.5 117596.5 230229.0   3321
## 311-M   2926.5  65436.0 113384.0 165604.0 268521.0   3321
## 369-M   2926.5 123189.5 181739.5 244457.4 268521.0   3486
## 345-H   2926.5  36628.5  75013.5 121187.0 236570.0   3403
## 311-H   2926.5  30207.5  75013.5 126802.0 249532.0   3321
## 369-H   2926.5 121187.0 171013.5 216938.5 268521.0   3486

ANOSIM Diagnostics

Run Multivariate ANOVA for Distance Matrix

PERMANOVA Diagnostics

Spatial Interpolations

SAV models, glmm

Model 1: shannon_quadratscale ~ bogaert_subsite + elevation_quadrat + salinity_subsite + site(random)

Model 2: simpsons ~ bogaert_subsite + elevation_quadrat + salinity_subsite + site(random)

Model 3: evenness ~ bogaert_subsite + elevation_quadrat + salinity_subsite + site(random)

Model 4: richness ~ bogaert_subsite + elevation_quadrat + salinity_subsite + site(random)